home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
SourceCode
/
AdobeExamples
/
NX_Patterns
/
Pattern.h
< prev
next >
Wrap
Text File
|
1992-12-19
|
3KB
|
103 lines
/*
* (a) (C) 1990 by Adobe Systems Incorporated. All rights reserved.
*
* (b) If this Sample Code is distributed as part of the Display PostScript
* System Software Development Kit from Adobe Systems Incorporated,
* then this copy is designated as Development Software and its use is
* subject to the terms of the License Agreement attached to such Kit.
*
* (c) If this Sample Code is distributed independently, then the following
* terms apply:
*
* (d) This file may be freely copied and redistributed as long as:
* 1) Parts (a), (d), (e) and (f) continue to be included in the file,
* 2) If the file has been modified in any way, a notice of such
* modification is conspicuously indicated.
*
* (e) PostScript, Display PostScript, and Adobe are registered trademarks of
* Adobe Systems Incorporated.
*
* (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
* CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
* AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
* ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
* OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
* WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
* WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
* DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS.
*/
/*
* Pattern.m
*
* This class provides objects that correspond to patterns. It is modeled after the
* Font class. It not a rigorous definition but is just a vehicle for demostrating the
* PostScript aspects of handling patterns.
*
* Version: 2.0
* Author: Ken Fromm
* History:
* 03-07-91 Added this comment.
*/
#import <objc/Object.h>
#import <appkit/graphics.h>
#import <appkit/color.h>
@interface Pattern : Object
{
char *name;
float size;
float *matrix;
int patternNum, /* This is the only one needed. */
patternImageNum; /* This is for compositing. */
id image;
NXRect cellRect;
struct _pFlags {
unsigned int _RESERVED:14;
unsigned int _matrixIsIdentity:1;
unsigned int _matrixIsFlipped:1;
} pFlags;
}
+ newPattern:(const char *) patternName size:(float) patternSize;
+ newPattern:(const char *) patternName size:(float) patternSize matrix:(const float *) patternMatrix;
/*
* This method is only for the demo program. An implementation
* in an application would probably make a decision as to
* the best pattern cell size and then use that in the +new
* methods removing this method.
*/
- definePatternRows:(int) rows andCols:(int) cols;
- free;
- image;
- compositeTo:(NXCoord) x :(NXCoord) y;
- (BOOL) hasMatrix;
- (const float *) matrix;
- (const char *) name;
- (int) patternNum;
- (float) pointSize;
- set;
- unset;
@end